Programmable logic devices, such as field programmable gate arrays (FPGA), enable the fast, efficient, and low-cost implementation of circuits in electronic devices. Programmable logic devices generally include logic elements which can be configured to implement logic functions. A portion of the programmable logic device can be partitioned to implement a plurality of hardware modules. That is, these hardware modules can be programmed as needed to implement a desired function of the programmable logic device.
In software, program code is written that makes use of external functions and data structures. These functions are contained in object or library files. When the program is compiled, a linking step pulls together the necessary object/library files and includes their functionality into the final executable. There are standard formats such as ELF and COFF which exist to define the structure of the object/library files. When this code gets compiled, the compiler sees that a function is an external reference, and leaves it up to the linker. The linker will search the list of library/object files to find a function with the correct signature, and it will insert the code into the executable.
Writing software that interacts with configurable hardware either requires (i) extra software code to set up the configurable logic, or (ii) extra steps to define the functionality of the configurable logic. In particular, the first methodology of enabling software to interact with configurable hardware includes adding extra code to the software program that loads in a required hardware module. The disadvantage of this methodology is that it requires extra code and creates a more complex interface.
The second methodology includes creating a fixed platform in advance, and writing the software program to use that platform. That is, all of the hardware modules are fixed in advance of the software. Instead of the software code implicitly defining the required hardware modules, an engineer has to explicitly specify the modules to put in hardware. There is currently no method of implementing hardware libraries in a software design in simple or efficient manner.
Accordingly, there is a need for an improved method of and apparatus for using hardware libraries in a programmable logic device.